import request from '@/utils/request'

// 查询新建格列表
export function listTable (query) {
  return request({
    url: '/rhtx/table/list',
    method: 'get',
    params: query
  })
}

// 查询新建格详细
export function getTable (query) {
  return request({
    url: '/rhtx/table/dj',
    method: 'get',
    params: query
  })
}
// 查询新建格详细
export function getTableEx (tableId) {
  return request({
    url: '/rhtx/table/' + tableId,
    method: 'get'
  })
}
// 新增新建格
export function addTable (data) {
  return request({
    url: '/rhtx/table',
    method: 'post',
    data: data
  })
}

// 修改新建格
export function updateTable (data) {
  return request({
    url: '/rhtx/table',
    method: 'put',
    data: data
  })
}

// 删除新建格
export function delTable (tableId) {
  return request({
    url: '/rhtx/table/del/' + tableId,
    method: 'delete'
  })
}
